<template>
      <div class="picTitle">
        <img :src="dogImg" alt="" />
        <p @click="click">{{ dogName }}</p>
      </div>
</template>

<script>
export default {
  props: ['dogImg', 'dogName'],
  methods: {
    click() {
      this.$emit("loveDog",this.dogName)
    }
  }
}
</script>

<style>
.picTitle {
  width: 200px;
  border: 1px solid #ccc;
  float: left;
}
.picTitle img {
  width: 100%;
  height: 200px;
}
.picTitle p {
  text-align: center;
}
</style>
